#pragma once 
#include "Head.h"

namespace WINDOW 
{
	class _declspec(dllexport) WinDows
	{
	private:
		static LRESULT CALLBACK WndHandle(HWND hwnd, UINT uint, WPARAM wparam, LPARAM lparam);
		HWND hwnd;
		MSG msg;
		HINSTANCE hInstance;
		WNDCLASSEX wndclass;
		BOOL isrunning;
		char mp_Class[20];
	public:
		WinDows(std::string Title, SIZE sZ, POINT PT);
		WinDows(std::string Title, SIZE sZ);
		WinDows(std::string Title);
		~WinDows(){ };


		void InitWin(std::string Windowname, SIZE sz, POINT pnt);

		BOOL RunWin();

		void Show(){ ShowWindow(hwnd, SW_SHOW); }
		void Hide(){ ShowWindow(hwnd, SW_HIDE); }

		HWND GetHWND(){ return hwnd; }

		SIZE GetWindowSize()
		{
			RECT rct;
			GetClientRect(hwnd, &rct);
			SIZE sZ = { rct.right - rct.left, rct.bottom - rct.top };
			return sZ;
		}
	};
}